package com.lizhi.rpc.controller;

import com.lizhi.rpc.handler.RecvAppointHandler;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: lizhi
 * @Description:
 * @Date: create in 2020/8/24 14:58
 */
@Slf4j
@RestController
@RequestMapping(value = "/api/rpc/appoint")
@Api("预约信息")
public class RecvAppointController {

    @Resource
    private RecvAppointHandler recvAppointHandler;

    @ApiOperation("接收同步的预约信息")
    @ApiImplicitParam(name = "json", value = "患者数据", required = true, dataType = "String", paramType = "query")
    @PostMapping(path = "/recvAppoint")
    public String recvPatient(@RequestBody String json){
        return recvAppointHandler.recvAppoint(json);
    }
}
